package mx.itesm.ccm.compu.dao;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;


public class WebContextListener implements ServletContextListener {


	public void contextDestroyed(ServletContextEvent sce) {
		final ServletContext servletContext = sce.getServletContext();
		servletContext.log("::::::::::::::::::::::::: WebContextListener :::::::::::::::::::::::::");
		servletContext.log("Asesorias contextDestroyed.");
		servletContext.log(":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::");
	}

	public void contextInitialized(ServletContextEvent sce) {
		
		ServletContext servletContext = sce.getServletContext();
		ContextHelper.setContext(servletContext);
		
		servletContext.log("::::::::::::::::::::::::: WebContextListener :::::::::::::::::::::::::");
		servletContext.log("Asesorias contextInitialized.");
		servletContext.log(":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::");

	}
}
